﻿using System;

namespace UtilsExtensionsAndHelpers.Extensions
{
    public static class ObjectExtensions
    {
        public static bool DoesntEqual(this object obj, object objToCompareTwo)
        {
            return !obj.Equals(objToCompareTwo);
        }

        public static bool IsBetween(this double obj, double start, double end)
        {
            return obj >= start && obj <= end;
        }
        public static bool IsBetween(this float obj, float start, float end)
        {
            return obj >= start && obj <= end;
        }
        public static bool IsBetween(this int obj, int start, int end)
        {
            return obj >= start && obj <= end;
        }
        public static bool IsBetween(this short obj, short start, short end)
        {
            return obj >= start && obj <= end;
        }
        public static bool IsBetween(this long obj, long start, long end)
        {
            return obj >= start && obj <= end;
        }
        public static bool IsBetween(this byte obj, byte start, byte end)
        {
            return obj >= start && obj <= end;
        }
        public static bool IsBetween(this decimal obj, decimal start, decimal end)
        {
            return obj >= start && obj <= end;
        }
        public static bool IsBetween(this DateTime obj, DateTime start, DateTime end)
        {
            return obj >= start && obj <= end;
        }
        
        public static bool IsOutside(this double obj, double start, double end)
        {
            return obj < start || obj > end;
        }
        public static bool IsOutside(this float obj, float start, float end)
        {
            return obj < start || obj > end;
        }
        public static bool IsOutside(this int obj, int start, int end)
        {
            return obj < start || obj > end;
        }
        public static bool IsOutside(this short obj, short start, short end)
        {
            return obj < start || obj > end;
        }
        public static bool IsOutside(this long obj, long start, long end)
        {
            return obj < start || obj > end;
        }
        public static bool IsOutside(this byte obj, byte start, byte end)
        {
            return obj < start || obj > end;
        }
        public static bool IsOutside(this decimal obj, decimal start, decimal end)
        {
            return obj < start || obj > end;
        }
        public static bool IsOutside(this DateTime obj, DateTime start, DateTime end)
        {
            return obj < start || obj > end;
        }
    }
}
